﻿@{
    ViewBag.Title = "ShowSetFiled";
    Layout = "~/Views/Shared/_AdminLayOut.cshtml";
}
@model UcAsp.Models.SetFiled 
           <script>
               $(document).ready(function () {
                   $("#save").click(function () {
                       $.post("/SetFiled/UpdateSetFiled", { FiledID: $("input[name='FiledID']").val(), FiledName: $("select[name='FiledName']").val(), CategoreiesID: $("select[name='CategoreiesID']").val(), CnName: $("input[name='CnName']").val(), Description: $("input[name='Description']").val(), DataType: $("input[name='DataType']").val(), Sort: $("input[name='Sort']").val(), IsNull: $('input[name="IsNull"]:checked').val(), IputType: $("select[name='IputType']").val(), DefaultValue: $("input[name='DefaultValue']").val(), StoreText: $("select[name='StoreText']").val() }, function () {

                       })
                   })
               });

           </script>
<form action="#" method="post">
    <div>
        <input name="FiledID" type="hidden" value="@Model.FiledID" />
        <p>
              <label>分类</label>
               @Html.DropDownListFor(m=>m.CategoreiesID, (SelectList)ViewData["selectlist"])
        </p>
       <p>
              <label>表单名称</label>
               @Html.DropDownListFor(m=>m.FiledName, (SelectList)ViewData["selectfiled"])
        </p>
        <p>
              <label>表述名称</label>
              <input class="text-input medium-input" type="text" id="large-input" name="CnName" value="@Model.CnName" />
        </p>
          
        <p>
              <label>描述</label>
            <input class="text-input medium-input" id="Description" name="Description" value="@Model.Description" />
             
        </p>
        <p>
              <label>数据类型</label>
              <input class="text-input large-input" type="text" id="DataType" name="DataType" value="@Model.DataType" /> 
        </p>
        <p>
            
              <label>是否允许空白</label><input id="IsNull" name="IsNull" type="radio" @if(Model.IsNull==true){ @(new HtmlString("checked=true")) } value="true" />是<input  id="IsNull" value="false" name="IsNull" type="radio" @if(Model.IsNull==false){ @(new HtmlString("checked=true")) }  /> 否
             
        </p>
        <p>
              <label>排序</label>
              <input class="text-input large-input" type="text" id="Sort" name="Sort" value="@Model.Sort" /> 
        </p>
        <p>
              <label>表单类型</label>
             @Html.DropDownListFor(m=>m.IputType, (SelectList)ViewData["inputfiled"])
        </p>
        <p>
              <label>默认值</label>
              <input class="text-input large-input" type="text" id="DefaultValue" name="DefaultValue" value="@Model.DefaultValue" /> 
        </p>
        <p>
              <label>绑定值</label>
              @Html.DropDownListFor(m=>m.StoreText, (SelectList)ViewData["sort"])
        </p>
        <p> 
               <input class="button" id="save" type="button" value=" 保存 " />
      </p>
    </div>
        </form>